import request from "@/utils/request";
import { getCurrentTime } from "@/utils/auth";


/**获取警报列表 */
export const getalarmlistApi = (data) => {
  return request({
    url: "/web/monitoring/alarms",
    method: "post",
    data
  });
};


/**条件查询警报列表 */
export const getalarmByConditionApi = ({agencyIds,search,pageSize,pageNumber}) => {
  return request({
    url: "/web/monitoring/searchAlarms",
    method: "get",
    params: {
      agencyIds: agencyIds,
      pageSize: pageSize,
      pageNumber: pageNumber,
    },
  });
};

/**设置机构警报 */
export const setAgencyAlarmApi = (data) => {
  return request({
    url: '/web/agency/alertRangeCfg',
    method: "post",
    data
  });
};
/**获取机构警报设置 */
export const getAgencyAlarmApi = (agencyId) => {
  return request({
    url: '/web/agency/alertRangeCfg',
    method: "get",
    params: {
      agencyId: agencyId
    }
  });
};
/**批量处理警报 */
export const handleAgencyAlarmStatusApi = (data) => {
  return request({
    url: '/web/monitoring/alarmsClose',
    method: "post",
    data
  });
}

/**未处理警报 */
export const unHandleAgencyAlarmListApi = (data) => {
  return request({
    url: '/web/monitoring/unDealAlarms',
    method: "post",
    data
  });
}
